import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'
import Login from '../views/Login'
import TopHeader from '../components/TopHeader'
import BottomTabber from '../components/BottomTabber'
import YezhuRepaire from '../views/yezhuRepaire.vue'
import My from '../views/my'
import QueryRepaire from '../views/queryRepaire'
import RepaireView from '../views/RepaireView'
import wuyeEmp from '../views/wuyeEmp'
import noticeMange from '../views/noticeMange'
import roleManage from '../views/roleManage'

Vue.use(VueRouter)
Vue.component('top-header', TopHeader)
Vue.component('bottom-tabber', BottomTabber)
const routes = [
    {
        path: '/',
        name: 'Login',
        component: Login,
    },
    {
        path: '/queryRepaire',
        name: 'QueryRepaire',
        component: QueryRepaire,
        meta: { requiresAuth: true }
    },
    {
        path: '/home',
        name: 'Home',
        component: Home,
        meta: { requiresAuth: true }
    },
    {
        path: '/yezhuRepaire',
        name: 'YezhuRepaire',
        component: YezhuRepaire,
        meta: { requiresAuth: true }
    },
    ,
    {
        path: '/my',
        name: 'My',
        component: My,
        meta: { requiresAuth: true }
    }
    ,
    {
        path: '/repaire',
        name: 'RepaireEm',
        component: RepaireView,
        meta: { requiresAuth: true }
    }
    ,
    {
        path: '/wuye',
        name: 'wuyeEmp',
        component: wuyeEmp,
        meta: { requiresAuth: true }
    },
    {
        path: '/release',
        name: 'noticeMange',
        component: noticeMange,
        meta: { requiresAuth: true }
    },
    {
        path: '/role' ,
        name: 'roleManage',
        component: roleManage,
        meta: {requiresAuth: true}
    }
]

const router = new VueRouter({
    mode: 'history',
    //base: process.env.BASE_URL,
    routes
})

export default router
